package com.ruoyi.consultation.service.impl;

import java.util.stream.Collectors;

import com.ruoyi.common.core.domain.TreeSelect;
import com.ruoyi.consultation.domain.LabConsultationSubject;

/**
 * Treeselect树结构实体类
 * 
 * @author ruoyi
 */
public class TreeSelectSubject extends TreeSelect {
	private static final long serialVersionUID = 1L;
	public TreeSelectSubject(LabConsultationSubject subject) {
		this.setId(subject.getSubjectId());
		this.setLabel(subject.getSubjectName());
		this.setChildren(subject.getChildren().stream().map(TreeSelectSubject::new).collect(Collectors.toList()));
	}
}
